home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
OTHERCST
/
MISC_ROU
/
DEFAULTO.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-07-16
|
656b
|
28 lines
#include <quickdraw.h>
/*
** DefaultOK
** This next little piece of code puts the default heavy rounded
** box around the "OK" button of a dialog, so the user knows that
** pressing return is the same as hitting "OK"
*/
void
DefaultOK(theDialog)
DialogPtr theDialog;
{
int itemType;
Handle itemHdl;
Rect itemRect;
GrafPort savedPort;
PenState savedPen;
GetPort(&savedPort);
GetPenState(&savedPen);
SetPort(theDialog); /* without this, can't highlite OK */
GetDItem(theDialog, 1, &itemType, &itemHdl, &itemRect);
PenSize(3,3);
InsetRect(&itemRect, -4, -4);
FrameRoundRect(&itemRect, 16, 16);
SetPenState(&savedPen);
SetPort(&savedPort);
}